]> dgit.raspbian.org Git - gnome-shell.git/commit
environment: reduce calls to g_time_zone_new_local()
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 27 Feb 2020 21:46:44 +0000 (13:46 -0800)
committerChristian Hergert <chergert@redhat.com>
Thu, 27 Feb 2020 21:48:26 +0000 (13:48 -0800)
commit06b690ff21204ea9ea26d2671eb26b1a1f24caa9
tree0b3d2b624bfcf93b1690458eb4d1a3e70cad936c
parentd0226c7897548a706627fb93a88b7e46d37fe5f7
environment: reduce calls to g_time_zone_new_local()

Creating a new GTimeZone for the local timezone can be quite expensive if
done repeatedly. It requires an open(), mmap(), and parsing of
/etc/localtime.

This patch was provided by Florian, and I've tested it as far back as
3.28.4 to ensure that we are really reducing the number of open() calls
on the compositor thread.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1051

Signed-off-by: Christian Hergert <chergert@redhat.com>
js/ui/environment.js